﻿<%@ Page Title="EditNews" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
    Inherits="System.Web.Mvc.ViewPage<SSE.Models.News>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" runat="server">
    <script charset="utf-8" src="../../ToolKit/KindEditor/kindeditor.js" type="text/javascript"></script>
    <script type="text/javascript">
        KE.show({
            id: 'cpMainContent_body',
            allowUpload: true, //允许上传图片
            imageUploadJson: '../../asp.net/upload_json.ashx',
            fileManagerJson: '../../asp.net/file_manager_json.ashx',
            allowFileManager: true,
            afterCreate: function (id) {
                KE.event.ctrl(document, 13, function () {
                    KE.util.setData(id);
                    document.forms['form1'].submit();
                });
                KE.event.ctrl(KE.g[id].iframeDoc, 13, function () {
                    KE.util.setData(id);
                    document.forms['form1'].submit();
                });
            }
        });
    </script>
    <form id="form1" method="post" enctype="multipart/form-data" action="<%= Url.Action("AddNews", "News") %>">
    <input id="title" name="title" type="text" style="width: 486px" />
    &nbsp;&nbsp;
    <input id="newsPic" name="newsPic" type="file" />
    <textarea id="body" name="body" cols="100" rows="8" style="width: 500px; height: 200px;
        visibility: hidden;" runat="server"></textarea><br />
    <br />
    <br />
    <br />
    <br />
    &nbsp;<br />
    <button type="submit" id="article-create-button">
        Create Article</button>
    </form>
</asp:Content>
